package com.ajk.server.model.query;

/**
 * 身体部位  <br>
 * dict_bodypart <br>
 * v1.0 2016-05-01
 */
 public class BodypartDictQuery extends Paging {

	 private static final long serialVersionUID = 1L;
	 
	 private Integer parentId;
	 
	 private String keyword;
	 
	 private Integer inUsed;

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
 
	public Integer getInUsed() {
		return inUsed;
	}

	public void setInUsed(Integer inUsed) {
		this.inUsed = inUsed;
	}

	@Override
	public void dealWith() {
		super.dealWith();
		
		if(this.keyword!=null && this.keyword.trim().length()>0){
			if(!keyword.startsWith("%")){
				this.keyword = "%"+this.keyword;
			}
			if(!keyword.endsWith("%")){
				this.keyword = this.keyword+"%";
			}
		}else{
			this.keyword = null;
		}
		
	}
}	